CentOS 7
Sponsored Link

OpenStack Kilo : Configure Heat#1
2015/06/20
 
Install OpenStack Orchestration Service (Heat).
This example shows to install Orchestration Services on the existing environment like follows.
For example, install and configure Orchestration Services on the Network Node.
                                |
+------------------+            |            +------------------------+
| [ Control Node ] |            |            |    [ Network Node ]    |
|     Keystone     |10.0.0.30   |   10.0.0.50|    DHCP,L3,L2 Agent    |
|      Glance      |------------+------------|     Metadata Agent     |
|     Nova API     |eth0        |        eth0|    Heat API,API-CFN    |
|  Neutron Server  |            |            |       Heat Engine      |
+------------------+            |            +------------------------+
                            eth0|10.0.0.51
                      +--------------------+
                      |  [ Compute Node ]  |
                      |    Nova Compute    |
                      |      L2 Agent      |
                      +--------------------+

 
Add users or databases for Heat services on the Control Node on this section.
[1] Install required packages first.
# install from RDO, EPEL

[root@dlp ~(keystone)]#
yum --enablerepo=openstack-kilo,epel -y install openstack-heat-common
[2] Add users and so on for Heat services in Keystone on the Control Node.
# add Heat user

[root@dlp ~(keystone)]#
openstack user create --project service --password servicepassword heat

+------------+----------------------------------+
| Field      | Value                            |
+------------+----------------------------------+
| email      | None                             |
| enabled    | True                             |
| id         | daa9499ce0f8427ca5c6dfe8d48da1b0 |
| name       | heat                             |
| project_id | 4e84300cbeeb4a68a0e1864ea0ae1869 |
| username   | heat                             |
+------------+----------------------------------+

# add Heat user to admin role

[root@dlp ~(keystone)]#
openstack role add --project service --user heat admin

+-------+----------------------------------+
| Field | Value                            |
+-------+----------------------------------+
| id    | 2100956a1c974cae8c81308845c174a8 |
| name  | admin                            |
+-------+----------------------------------+

# create a role for Heat

[root@dlp ~(keystone)]#
openstack role create heat_stack_owner

+-------+----------------------------------+
| Field | Value                            |
+-------+----------------------------------+
| id    | 77f9223a354740268aafbcc9e25d19bc |
| name  | heat_stack_owner                 |
+-------+----------------------------------+

[root@dlp ~(keystone)]#
openstack role create heat_stack_user

+-------+----------------------------------+
| Field | Value                            |
+-------+----------------------------------+
| id    | 13b844cab6f84e1c9f8aa88ad5cf68b1 |
| name  | heat_stack_user                  |
+-------+----------------------------------+

# add admin user to heat_stack_owner role

[root@dlp ~(keystone)]#
openstack role add --project admin --user admin heat_stack_owner
+-------+----------------------------------+
| Field | Value                            |
+-------+----------------------------------+
| id    | 77f9223a354740268aafbcc9e25d19bc |
| name  | heat_stack_owner                 |
+-------+----------------------------------+

# create service entry for Heat

[root@dlp ~(keystone)]#
openstack service create --name heat --description "Openstack Orchestration" orchestration

+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| description | Openstack Orchestration          |
| enabled     | True                             |
| id          | 27ca1a331b094b0e9564ba1d3727c92c |
| name        | heat                             |
| type        | orchestration                    |
+-------------+----------------------------------+

[root@dlp ~(keystone)]#
openstack service create --name heat-cfn --description "Openstack Orchestration" cloudformation

+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| description | Openstack Orchestration          |
| enabled     | True                             |
| id          | 2306ba0683ac4d7d9b300eab803d67a3 |
| name        | heat-cfn                         |
| type        | cloudformation                   |
+-------------+----------------------------------+

# define Heat API server's IP

[root@dlp ~(keystone)]#
heat_api=10.0.0.50
# create endpoint entry for Heat

[root@dlp ~(keystone)]#
openstack endpoint create \
--publicurl http://$heat_api:8004/v1/%\(tenant_id\)s \
--internalurl http://$heat_api:8004/v1/%\(tenant_id\)s \
--adminurl http://$heat_api:8004/v1/%\(tenant_id\)s \
--region RegionOne \
orchestration

+--------------+----------------------------------------+
| Field        | Value                                  |
+--------------+----------------------------------------+
| adminurl     | http://10.0.0.50:8004/v1/%(tenant_id)s |
| id           | d2957bc7f79a4832b9fee90fd13f840a       |
| internalurl  | http://10.0.0.50:8004/v1/%(tenant_id)s |
| publicurl    | http://10.0.0.50:8004/v1/%(tenant_id)s |
| region       | RegionOne                              |
| service_id   | 27ca1a331b094b0e9564ba1d3727c92c       |
| service_name | heat                                   |
| service_type | orchestration                          |
+--------------+----------------------------------------+

[root@dlp ~(keystone)]#
openstack endpoint create \
--publicurl http://$heat_api:8000/v1 \
--internalurl http://$heat_api:8000/v1 \
--adminurl http://$heat_api:8000/v1 \
--region RegionOne \
cloudformation

+--------------+----------------------------------+
| Field        | Value                            |
+--------------+----------------------------------+
| adminurl     | http://10.0.0.50:8000/v1         |
| id           | 970aea8e957d438389d7bc437e539575 |
| internalurl  | http://10.0.0.50:8000/v1         |
| publicurl    | http://10.0.0.50:8000/v1         |
| region       | RegionOne                        |
| service_id   | 2306ba0683ac4d7d9b300eab803d67a3 |
| service_name | heat-cfn                         |
| service_type | cloudformation                   |
+--------------+----------------------------------+

# create Heat domain

[root@dlp ~(keystone)]#
heat-keystone-setup-domain \
--stack-user-domain-name heat_user_domain \
--stack-domain-admin heat_domain_admin \
--stack-domain-admin-password domainpassword

Please update your heat.conf with the following in [DEFAULT]

stack_user_domain_id=bd07e0b9203640798b22a8845bb4a465
stack_domain_admin=heat_domain_admin
stack_domain_admin_password=domainpassword
[3] Create a database for Heat to MariaDB.
[root@dlp ~(keystone)]#
mysql -u root -p

Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 57
Server version: 5.5.41-MariaDB MariaDB Server

Copyright (c) 2000, 2014, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]>
create database heat;

Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]>
grant all privileges on heat.* to heat@'localhost' identified by 'password';

Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
grant all privileges on heat.* to heat@'%' identified by 'password';

Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
flush privileges;

Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
exit

Bye
 
Tweet